﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QuanLyBanHang_NewApp.Entity
{
    public class NhaCungCap
    {
        private long maNCC;
        private string tenNCC, diaChi, dienThoai;

        public NhaCungCap(long ma, string ten, string dc, string dt)
        {
            maNCC = ma;
            tenNCC = ten;
            diaChi = dc;
            dienThoai = dt;
        }

        //public long MaNCC { get { return maNCC; } set { maNCC = value; } }
        //public string TenNCC { get { return tenNCC; } set { tenNCC = value; } }
        //public string DiaChi { get { return diaChi; } set { diaChi = value; } }
        //public string DienThoai { get { return dienThoai; } set { dienThoai = value; } }

        public string getAttribute(int index)
        {
            switch (index)
            {
                case 0: return maNCC.ToString();
                case 1: return tenNCC;
                case 2: return diaChi;
                case 3: return dienThoai;
                default: return "!error";
            }
        }

        public string toString()
        {
            return "Mã NCC: " + maNCC.ToString() + "\nTên NCC: " + tenNCC;
        }

    }
}
